package work.mediway.mdm.biz.dto.dict;

import javax.validation.constraints.NotBlank;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.ToString;

/**
 * @author zhongyj <1126834403@qq.com><br/>
 * @date 2020/12/17
 */
@ToString
@Getter
@ApiModel
public class DictFieldDTO {

    @ApiModelProperty(value = "表名称", required = true)
    @NotBlank(message = "表名称不能为空")
    private String tableCode;

    @ApiModelProperty(value = "字段名称", hidden = true)
    private String fieldCode;

    @ApiModelProperty(value = "字段值", hidden = true)
    private String fieldValue;

    @ApiModelProperty(value = "字段描述", hidden = true)
    private String fieldDesc;

    @ApiModelProperty(value = "角色id(若当前用户和用户都未传，默认查询当前用户)")
    private String roleId;

    @ApiModelProperty(value = "用户id(若当前用户和用户都未传，默认查询当前用户)")
    private String userId;

    @ApiModelProperty(value = "查询条件(完整条件：code = '00001')")
    private String queryCondi;

    public static DictFieldDTO getInstance() {
        return new DictFieldDTO();
    }

    public DictFieldDTO setTableCode(String tableCode) {
        this.tableCode = tableCode;
        return this;
    }

    public DictFieldDTO setFieldCode(String fieldCode) {
        this.fieldCode = fieldCode;
        return this;
    }

    public DictFieldDTO setFieldValue(String fieldValue) {
        this.fieldValue = fieldValue;
        return this;
    }

    public DictFieldDTO setFieldDesc(String fieldDesc) {
        this.fieldDesc = fieldDesc;
        return this;
    }

    public DictFieldDTO setRoleId(String roleId) {
        this.roleId = roleId;
        return this;
    }

    public DictFieldDTO setUserId(String userId) {
        this.userId = userId;
        return this;
    }

    public DictFieldDTO setQueryCondi(String queryCondi) {
        this.queryCondi = queryCondi;
        return this;
    }
}
